package com.tianpengtech.front.web;

import com.jfinal.config.Routes;
import com.tianpengtech.common.pay.weixin.controller.PayController;
import com.tianpengtech.front.web.common.interceptor.PassportInterceptor;
import com.tianpengtech.front.web.common.interceptor.WebsiteInterceptor;
import com.tianpengtech.front.web.count.TaskCountController;
import com.tianpengtech.front.web.fair.FairWebController;
import com.tianpengtech.front.web.feedback.FeedBackWebController;
import com.tianpengtech.front.web.index.IndexWebController;
import com.tianpengtech.front.web.login.LoginController;
import com.tianpengtech.front.web.main.MainWebController;
import com.tianpengtech.front.web.passport.PassportWebController;
import com.tianpengtech.front.web.qiniu.QiNiuController;
import com.tianpengtech.front.web.task.TaskWebController;
import com.tianpengtech.front.web.tasktemplate.TaskTemplateController;

/**
 * The web's router
 * @author Delicate
 */
public class WebRoutes extends Routes {
    /**
     * Implement this method to add route, add interceptor and set baseViewPath
     */
    public static final String path = "";
    public void config() {
        setBaseViewPath("/WEB-INF/view");
        this.addInterceptor(new WebsiteInterceptor());//base information inject
        this.addInterceptor(new PassportInterceptor());
        this.add("/c", IndexWebController.class,"/web/index");
        this.add("/platform", MainWebController.class,"/web/main");
        this.add("/platform/fair", FairWebController.class,"/web/fair");
        this.add("/platform/feedback", FeedBackWebController.class,"/web/feedback");
        this.add("/platform/task", TaskWebController.class,"/web/task");
        this.add("/platform/mission", TaskCountController.class,"/web/task");
        this.add("/passport", PassportWebController.class,"/web/passport");
        this.add("/login", LoginController.class,"/web/passport");
        this.add("/qiniu", QiNiuController.class);
        this.add("/pay", PayController.class,"/web/pay");
            }
}
